package models;

import play.data.validation.Required;
import play.db.jpa.Model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import java.util.Date;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: bicho
 * Date: 21/06/12
 * Time: 12:21
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "granja")
public class Granja extends Model {

    @Column(name = "fecha_creacion")
    public Date fechaCreacion;

    @Required
    @Column(name = "nombre")
    public String nombre;

    @Column(name = "activo")
    public boolean activo;

    @Override
    public String toString() {
        return nombre;
    }

//    @ManyToMany
//    public Set<Usuario> usuarios;
}
